/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50728
 Source Host           : localhost:3306
 Source Schema         : hc

 Target Server Type    : MySQL
 Target Server Version : 50728
 File Encoding         : 65001

 Date: 26/08/2020 01:11:14
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for red_packet_info
-- ----------------------------
DROP TABLE IF EXISTS `red_packet_info`;
CREATE TABLE `red_packet_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `red_packet_id` bigint(11) NOT NULL DEFAULT '0' COMMENT '红包id，采⽤\ntimestamp+5位随机数',
  `total_amount` int(11) NOT NULL DEFAULT '0' COMMENT '红包总⾦额，单位分',
  `total_packet` int(11) NOT NULL DEFAULT '0' COMMENT '红包总个数',
  `remaining_amount` int(11) NOT NULL DEFAULT '0' COMMENT '剩余红包⾦额，单位\n分',
  `remaining_packet` int(11) NOT NULL DEFAULT '0' COMMENT '剩余红包个数',
  `uid` int(20) NOT NULL DEFAULT '0' COMMENT '新建红包⽤户的⽤户标识',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COMMENT='红包信息\n表，新建⼀个红包插⼊⼀条记录';

-- ----------------------------
-- Records of red_packet_info
-- ----------------------------
BEGIN;
INSERT INTO `red_packet_info` VALUES (8, 1598373426917, 20000, 10, 20000, 10, 10086, '2020-08-26 00:37:07', '2020-08-26 00:37:06');
COMMIT;

-- ----------------------------
-- Table structure for red_packet_record
-- ----------------------------
DROP TABLE IF EXISTS `red_packet_record`;
CREATE TABLE `red_packet_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` int(11) NOT NULL DEFAULT '0' COMMENT '抢到红包的⾦额',
  `nick_name` varchar(32) NOT NULL DEFAULT '0' COMMENT '抢到红包的⽤户的⽤户\n名',
  `img_url` varchar(255) NOT NULL DEFAULT '0' COMMENT '抢到红包的⽤户的头像',
  `uid` int(20) NOT NULL DEFAULT '0' COMMENT '抢到红包⽤户的⽤户标识',
  `red_packet_id` bigint(11) NOT NULL DEFAULT '0' COMMENT '红包id，采⽤\ntimestamp+5位随机数',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb4 COMMENT='抢红包记\n录表，抢⼀个红包插⼊⼀条记录';

-- ----------------------------
-- Records of red_packet_record
-- ----------------------------
BEGIN;
INSERT INTO `red_packet_record` VALUES (46, 464, '陈彦斌', 'https://images.cnblogs.com/cnblogs_com/chenyanbin/1560326/o_qianxun.jpg', 10086, 1598373426917, '2020-08-26 00:47:14', '2020-08-26 00:47:13');
INSERT INTO `red_packet_record` VALUES (47, 3704, '陈彦斌', 'https://images.cnblogs.com/cnblogs_com/chenyanbin/1560326/o_qianxun.jpg', 10086, 1598373426917, '2020-08-26 00:47:14', '2020-08-26 00:47:13');
INSERT INTO `red_packet_record` VALUES (48, 511, '陈彦斌', 'https://images.cnblogs.com/cnblogs_com/chenyanbin/1560326/o_qianxun.jpg', 10086, 1598373426917, '2020-08-26 00:47:14', '2020-08-26 00:47:13');
INSERT INTO `red_packet_record` VALUES (49, 4152, '陈彦斌', 'https://images.cnblogs.com/cnblogs_com/chenyanbin/1560326/o_qianxun.jpg', 10086, 1598373426917, '2020-08-26 00:47:14', '2020-08-26 00:47:13');
INSERT INTO `red_packet_record` VALUES (50, 168, '陈彦斌', 'https://images.cnblogs.com/cnblogs_com/chenyanbin/1560326/o_qianxun.jpg', 10086, 1598373426917, '2020-08-26 00:47:14', '2020-08-26 00:47:13');
INSERT INTO `red_packet_record` VALUES (51, 2116, '陈彦斌', 'https://images.cnblogs.com/cnblogs_com/chenyanbin/1560326/o_qianxun.jpg', 10086, 1598373426917, '2020-08-26 00:47:14', '2020-08-26 00:47:13');
INSERT INTO `red_packet_record` VALUES (52, 95, '陈彦斌', 'https://images.cnblogs.com/cnblogs_com/chenyanbin/1560326/o_qianxun.jpg', 10086, 1598373426917, '2020-08-26 00:47:14', '2020-08-26 00:47:13');
INSERT INTO `red_packet_record` VALUES (53, 1413, '陈彦斌', 'https://images.cnblogs.com/cnblogs_com/chenyanbin/1560326/o_qianxun.jpg', 10086, 1598373426917, '2020-08-26 00:47:14', '2020-08-26 00:47:13');
INSERT INTO `red_packet_record` VALUES (54, 5924, '陈彦斌', 'https://images.cnblogs.com/cnblogs_com/chenyanbin/1560326/o_qianxun.jpg', 10086, 1598373426917, '2020-08-26 00:47:14', '2020-08-26 00:47:13');
INSERT INTO `red_packet_record` VALUES (55, 1453, '陈彦斌', 'https://images.cnblogs.com/cnblogs_com/chenyanbin/1560326/o_qianxun.jpg', 10086, 1598373426917, '2020-08-26 00:47:14', '2020-08-26 00:47:13');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
